import request from '@/utils/system/request'

export function getAll() {
  return request({
    url: '/user/all-user',
    method: 'get'
  })
}

export function getAllByDepartment() {
  return request({
    url: '/user/all-user-by-department',
    method: 'get'
  })
}

// 获取数据api
export function getData(data: object) {
  return request({
    url: '/user/user-list',
    method: 'post',
    data
  })
}

// 新增
export function add(data: object) {
  return request({
    url: '/user/user',
    method: 'post',
    data
  })
}

// 编辑
export function update(data: object) {
  return request({
    url: '/user/user',
    method: 'put',
    data
  })
}

// 删除
export function del(data: object) {
  return request({
    url: '/user/user',
    method: 'delete',
    data
  })
}

